<?php
/**
 * @copyright  For copyright and license information, read the COPYING.txt file.
 * @link       /COPYING.txt
 * @license    Academic Free License (AFL 3.0)
 * @package     base_default
 */
?>
<?php
/**
 * @var Mage_Sales_Block_Order_Item_Renderer_Default $this
 */
?>
<?php $_item = $this->getItem() ?>
<?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
<tr class="border" id="order-item-row-<?php echo $_item->getId() ?>">
    <td><h4 class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></h4>
        <?php if($_options = $this->getItemOptions()): ?>
        <dl class="item-options">
        <?php foreach ($_options as $_option) : ?>
            <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
            <?php if (!$this->getPrintStatus()): ?>
                <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
                <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif ?>>
                    <?php echo $_formatedOptionValue['value'] ?>
                    <?php if (isset($_formatedOptionValue['full_view'])): ?>
                    <div class="truncated_full_value">
                        <dl class="item-options">
                            <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
                            <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
                        </dl>
                    </div>
                    <?php endif ?>
                </dd>
            <?php else: ?>
                <dd><?php echo $this->escapeHtml( ($_option['print_value'] ?? $_option['value']) ) ?></dd>
            <?php endif ?>
        <?php endforeach ?>
        </dl>
        <?php endif ?>
        <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
        <?php if ($addInfoBlock) :?>
            <?php echo $addInfoBlock->setItem($_item->getOrderItem())->toHtml(); ?>
        <?php endif ?>
        <?php echo $this->escapeHtml($_item->getDescription()) ?>
        <?php if($this->canDisplayGiftmessage()): ?>
            <a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>')"><?php echo $this->__('Gift Message') ?></a>
        <?php endif ?>
    </td>
    <td><?php echo $this->escapeHtml(Mage::helper('core/string')->splitInjection($this->getSku())) ?></td>
    <td class="a-center"><?php echo $_item->getQty()*1 ?></td>
</tr>
